package com.example.teesystem.entityDto;

import com.example.teesystem.common.cache.UserCache;
import com.example.teesystem.common.utils.TimeUtil;
import com.example.teesystem.entity.ExamPaper;
import com.example.teesystem.entity.User;
import lombok.Data;

@Data
public class SimplePaperInfo {
//    private Integer studentId;
//    private String studentName;
//    private String academy;
    private Integer paperId;
    private String paperName;
//    private String examTime;

    public SimplePaperInfo(Integer studentId, ExamPaper examPaper){
//        this.studentId = studentId;
        User def = new User();
        def.setMyName("用户未找到");
//        this.studentName = UserCache.userMap.getOrDefault(studentId, def).getUsername();
//        this.academy = UserCache.userMap.getOrDefault(studentId, def).getAcademy();
        this.paperId = examPaper.getId();
        this.paperName = examPaper.getName();
//        this.examTime = TimeUtil.dateTimeToString(examPaper.getStartTime());
    }
}

